package com.zdsoft.blp.gongyong.isLoginSuccess;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;

import com.zdsoft.blp.zongbuju.wode.activity.DengLuActivity;

/**
 * Created by pc on 2016/9/6.
 */
public class IsLoginSuccess  {
    private static  SharedPreferences sp;

    public static boolean isloginSuccess(Context context,boolean isBack){
        sp =context.getSharedPreferences("info", Context.MODE_PRIVATE);
        if(sp.getBoolean("isLoginSuccess", false)){
            return true;
        }else {
            Intent intent = new Intent(context, DengLuActivity.class);
            intent.putExtra("isBack",isBack);
            context.startActivity(intent);
        }
        return false;
    }

}
